// redux/breadcrumbSlice.js
import { createSlice } from '@reduxjs/toolkit';

const initialState = {
    breadcrumbItems: [
        { title: '首页', typeChildren: '' },
    ], // 存储面包屑信息
};

const breadcrumbSlice = createSlice({
    name: 'breadcrumb',
    initialState,
    reducers: {
        setBreadcrumbItems: (state, action) => {
            state.breadcrumbItems = action.payload;
        },
    },
});

export const { setBreadcrumbItems } = breadcrumbSlice.actions;
export default breadcrumbSlice.reducer;
